.PHONY: run

build:
	go build -v -o bin/api ./cmd/api

run:
	bin/api

dev:
	gin -i --build ./cmd/api --bin bin/api run bin/api

build-linux:
	GOOS=linux GOARCH=amd64 go build -v -o bin/api-linux ./cmd/api

pub:
	ssh mls_ql "service yq-api stop"
	make build-linux
	scp bin/api-linux mls_ql:/home/yq/bin/api
	make swagger-init
	ssh mls_ql "rm -rf /home/yq/docs"
	scp -r ./docs mls_ql:/home/yq/docs
	ssh mls_ql "service yq-api start"

swagger-init:
	swag init -g ./cmd/api/main.go -o docs